import { defineStore } from 'pinia'
import { ref } from 'vue'

// 主题模块
export const useThemeStore = defineStore(
  'template-theme',
  () => {
    const colorTheme = ref(true)
    const getColorTheme = () => {
      return colorTheme.value
    }
    const setColorTheme = () => {
      colorTheme.value = !colorTheme.value
    }
    return { colorTheme, getColorTheme, setColorTheme }
  },
  {
    persist: true // 持久化
  }
)
